
package com.wyzz.hr.pojo;

import java.util.Map;

import com.wyzz.hr.base.ComonBeans;
import com.wyzz.hr.pojo.base.BaseInmatch;


public class Inmatch extends BaseInmatch {

	public Inmatch() {
	}

	public Inmatch(String imId) {
		super(imId);
	}

	public Inmatch(String imId, InmatchModel imImm, InmatchBasic imImb,
			String imFieldDesc, Integer imDetectError, Integer imRequired,
			Integer imIsInput, Integer imSortId, String imSample) {
		super(imId, imImm, imImb, imFieldDesc, imDetectError, imRequired,
				imIsInput, imSortId, imSample);
	}

	public void initByInmatchBasic(InmatchBasic inmatchBasic) {
		super.setImImb(inmatchBasic);
		super.setImFieldDesc(inmatchBasic.getImbFieldDesc());
		super.setImFormat(inmatchBasic.getImbFormat());
		super.setImSortId(inmatchBasic.getImbSortId());
		super.setImDetectError(inmatchBasic.getImbDetectError());
		super.setImRequired(inmatchBasic.getImbRequired());
		super.setImSample(inmatchBasic.getImbSample());
	}

	public void setAllMaps() {
		formatDesc = null;
		imDetectErrorMap = null;
		imRequiredMap = null;
		imDetectErrorMap = ComonBeans.getValuesToMap("yesOrNo", new boolean[0]);
		imRequiredMap = ComonBeans.getValuesToMap("yesOrNo", new boolean[0]);
		if (getImImb() == null || getImImb().getImbDataType() == null) {
			return;
		} else {
			formatDesc = ComonBeans.getParameterValue(
					InmatchBasic.PROP_IMB_FORMAT, new String[] { getImImb()
							.getImbDataType() });
			return;
		}
	}

	public Map getImRequiredMap() {
		return imRequiredMap;
	}

	public Map getImDetectErrorMap() {
		return imDetectErrorMap;
	}

	public String getFormatDesc() {
		return formatDesc;
	}

	private static final long serialVersionUID = 1L;
	private Map imRequiredMap;
	private Map imDetectErrorMap;
	private String formatDesc;
}
